<?php

namespace app\api\route;
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

//验证码显示路由
Route::get('captcha/:id', '\\think\\captcha\\CaptchaController@index')->allowCrossDomain();


//验证码请求接口
Route::get('captcha', 'Login/index')->allowCrossDomain();
//验证登录接口路由
Route::post('login', 'Login/login')->allowCrossDomain();
//退出登录接口
Route::get('logout', 'Login/logout')->allowCrossDomain();
// 权限
Route::resource('auths', 'Auths')->allowCrossDomain();
// 用户
Route::resource('admins', 'Admin')->allowCrossDomain();
// 角色
Route::resource('roles', 'Roles')->allowCrossDomain();
// 上传图像
Route::post('logo', 'Upload/logo')->allowCrossDomain();
// 七牛云上传
Route::post('logo', 'Upload/img')->allowCrossDomain();
// 商品品牌
Route::resource('brands', 'Brand')->allowCrossDomain();
// 商品类型
Route::resource('types', 'Types')->allowCrossDomain();
// 商品
Route::resource('goods', 'Goods')->allowCrossDomain();
// 商品分类
Route::resource('categorys', 'Category')->allowCrossDomain();



